package com.xixi.core.rpc.config;

import com.xixi.core.rpc.fault.retry.RetryStrategyKeys;
import com.xixi.core.rpc.fault.tolerant.TolerantStrategyKeys;
import com.xixi.core.rpc.loadbalancer.LoadBalancerKeys;
import com.xixi.core.rpc.serializer.CustomSerializerKeys;
import lombok.Data;

/**
 * @author: zxh
 * @date: 2024/8/21 16:40
 * @description: RPC框架配置
 */
@Data
public class RpcConfig {

	// 名称
	private String name = "xixi-rpc";

	// 版本号
	private String version = "1.0";

	// 服务器主机名
	private String serverHost = "localhost";

	// 服务器端口号
	private Integer serverPort = 8080;

	// 模拟调用
	private boolean mock = false;

	// 序列化器
	private String serializer = CustomSerializerKeys.JDK;

	// 注册中心配置
	private RegistryConfig registryConfig = new RegistryConfig();

	// 负载均衡器
	private String loadBalancer = LoadBalancerKeys.ROUND_ROBIN;

	// 重试策略
	private String retryStrategy = RetryStrategyKeys.NO;

	// 容错策略
	private String tolerantStrategy = TolerantStrategyKeys.FAIL_FAST;
}
